package generic;

public class IdNamePrinterUtils {

    public static   <T extends Person> void print(T t){
        System.out.println(t.getId());
        System.out.println(t.getName());
    }


}

class Person{

    private Integer id;
    private String Name;

    public Person(){

    }


    public Person(Integer id, String name) {
        this.id = id;
        Name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }
}

class Chinese extends Person{

    public Chinese(Integer id, String name) {
        super(id,name);
    }
}

class Japanese extends  Person{
    public Japanese(Integer id, String name){
        super(id,name);
    }
}